package org.ceteca.explica.core.installer;

public interface InterfaceModuleParser {
	/* -----------------------------------------------------------------
     * -----------------------------------------------------------------
     * ----------------------   TAG NAMES ------------------------------
     * -----------------------------------------------------------------
     * ----------------------------------------------------------------- */

	/** Header of the xml traceability files */
	public static String XML_HEADER = "<?xml version=\"1.0\"?>\n<!DOCTYPE traceability-tree SYSTEM \"/home/usuario01/workspace/TraceabilityTreeViewer/src/org/ceteca/traceabilityTreeViewer/tree/parser/traceabilityTree.dtd\">";
	
	/** Starting character of an xml tag */
    public static String START_XML_TAG = "<";
    
    /** Ending character of an xml tag */
    public static String END_XML_TAG = ">";
    
    /** White space character */
    public static String WHITE_SPACE = " ";
    
    /** Slash character */
    public static String SLASH = "/";
    
    /** End of line character */
    public static String END_LINE = "\n";
    
    /** Tab character */
    public static String TAB = "   ";
	
	/** Name of the module tag in the module configuration file */
    public static String MODULE_TAG = "module";

    /** Name of the entity tag in the module configuration file */
    public static String ENTITY_TAG = "entity";
    
    /** Name of the field tag in the module configuration file */
    public static String FIELD_TAG = "field";
    
    /* -----------------------------------------------------------------
     * -----------------------------------------------------------------
     * ----------------------   PROPERTY NAMES -------------------------
     * -----------------------------------------------------------------
     * ----------------------------------------------------------------- */
	
    /** Name of the name property of the item <module> */
    public static String MODULE_NAME_PROPERTYNAME = "name";
    /** Name of the icon property of the item <module> */
    public static String MODULE_ICON_PROPERTYNAME = "icon";
    /** Name of the main-class property of the item <module> */
    public static String MODULE_MAINCLASS_PROPERTYNAME = "mainClass";
    /** Name of the main-method property of the item <module> */
    public static String MODULE_MAINMETHOD_PROPERTYNAME = "mainMethod";
    /** Name of the log-category property of the item <module> */
    public static String MODULE_LOGCATEGORY_PROPERTYNAME = "logCategory";
    /** Name of the log-configFile property of the item <module> */
    public static String MODULE_LOGCONFIGFILE_PROPERTYNAME = "logConfigFile";
    /** Name of the msg-propFile property of the item <module> */
    public static String MODULE_MSGPROPFILE_PROPERTYNAME = "msgPropFile";
    
    
    /** Name of the key property of the item <entity> */
    public static String ENTITY_KEY_PROPERTYNAME = "key";
    /** Name of the name property of the item <entity> */
    public static String ENTITY_NAME_PROPERTYNAME = "name";
    /** Name of the icon property of the item <entity> */
    public static String ENTITY_ICON_PROPERTYNAME = "icon";
    /** Name of the idField property of the item <entity> */
    public static String ENTITY_IDFIELD_PROPERTYNAME = "idField";
    /** Name of the helper-class property of the item <entity> */
    public static String ENTITY_HELPERCLASS_PROPERTYNAME = "entityHelperClass";
    /** Name of the visible property of the item <entity> */
    public static String ENTITY_VISIBLE_PROPERTYNAME = "visible";
    
    /** Name of the id property of the item <field> */
    public static String FIELD_ID_PROPERTYNAME = "id";
    /** Name of the name property of the item <field> */
    public static String FIELD_NAME_PROPERTYNAME = "name";
    /** Name of the searchable property of the item <field> */
    public static String FIELD_SEARCHABLE_PROPERTYNAME = "searchable";
    /** Name of the visible property of the item <field> */
    public static String FIELD_VISIBLE_PROPERTYNAME = "visible";
    /** Name of the detail entity property of the item <field> */
    public static String FIELD_DETAILENTITY_PROPERTYNAME = "detailEntity";
    /** Name of the detail field property of the item <field> */
    public static String FIELD_DETAILFIELD_PROPERTYNAME = "detailField";
    
    /* -----------------------------------------------------------------
     * -----------------------------------------------------------------
     * ---------------------   ERROR CODES -----------------------------
     * -----------------------------------------------------------------
     * ----------------------------------------------------------------- */
    public final static int ERROR_EMPTY_TAG = 101;
    public final static int ERROR_UNKNOWN_TAG = 102;
    public final static int ERROR_UNEXPECTED_TAG = 103;
    public final static int ERROR_GLADE_PARSER = 104;
    
    
    /* -----------------------------------------------------------------------
     *                          LOG MESSAGES:
     * Constants with the messages strings used for logging.
     * ----------------------------------------------------------------------- */
    /**
     * Message for logging the creation of a valid Module Parser.
     */
    public static final String MODULE_LOG_CREATE_PARSER = "Instance of Module Parser successfully created.";
    /**
     * Message for logging the path of the glade file to be parsed
     */
    public static final String MODULE_LOG_PARSE_FILEPATH = "The module configuration file to be parsed is ready at the path: %s";
    /**
     * Message for logging an error during the creation of the Module Parser instance.
     */
    public static final String MODULE_LOG_ERROR_GETTING_PARSER = "Error! Cannot get a valid Module Parser instance!";
    /**
     * Message for logging an error accessing or reading the module configuration file to be parsed,
     * such as file not found, or file not accesible or file with no needed permissions, etc.
     */
    public static final String MODULE_LOG_ERROR_READING_FILE = "Error! The module configuration file is not found, is not accessible or don't have the needed permissions!";
    /**
     * Message for logging a general error during the parsing of the configuration file.
     */
    public static final String MODULE_LOG_ERROR_PARSING_FILE = "Error! An error has taken place during the parsing of the module configuration file!";
    /**
     * Message for logging the start of the configuration file document parsing.
     */
    public static final String MODULE_LOG_PARSING_START_DOCUMENT = "Starting document parsing.";
    /**
     * Message for logging the start of a module configuration element parsing.
     */
    public static final String MODULE_LOG_PARSING_START_ELEMENT = "Starting element %s parsing: %s, %s, %s.";
    /**
     * Message for logging the end of a module configuration element parsing.
     */
    public static final String MODULE_LOG_PARSING_END_ELEMENT = "Ending element %s parsing: %s, %s.";
    
}
